import skRequest from '../request'

// 获取菜单列表
export function postMenuListData(data: any) {
  return skRequest.post({
    url: '/menu/list',
    data
  })
}

// 根据id删除菜单
export function deleteMenuById(id: number) {
  return skRequest.delete({
    url: `/menu/${id}`
  })
}

// 新建菜单
export function createMenuData(menuInfo: any) {
  return skRequest.post({
    url: '/menu',
    data: menuInfo
  })
}

// 编辑菜单
export function editMenuData(id: number, menuInfo: any) {
  return skRequest.patch({
    url: `/menu/${id}`,
    data: menuInfo
  })
}
